package com.classAnnotation;

import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 23735
 * Date: 2023-02-07
 * Time: 21:37
 */

@Component
public class UserComponent {
    public void display(String name){
        System.out.println("@Component"+name);
    }

    public User getUser(Integer id, String name){
        User user=new User();
        user.setId(id);
        user.setName(name);
        return user;
    }
}
